﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security.Principal;
using System.Security.Cryptography;
using System.Collections;
using System.Collections.Generic;
using ASER.BusinessLogic.Security;


/// <summary>
/// 用户角色标识
/// </summary>
public class ASERPrincipal : System.Security.Principal.IPrincipal
{

    #region 私有成员定义

    protected System.Security.Principal.IIdentity identity;
    protected ArrayList permissionList;    

    #endregion

    #region 构造器

    public ASERPrincipal(string userName)
    {
        //using (LoginBusiness UserPermits = new LoginBusiness())
        //{
        //    permissionList = UserPermits.GetUserPermits(userName);
        //}
        identity = new ASERIdentity(userName);
    }
    #endregion

    #region 继承成员

    public System.Security.Principal.IIdentity Identity
    {
        get
        {
            return identity;
        }       
    }

    public bool IsInRole(string role)
    {
        return true;
    }
    #endregion
}

